<?php
//start the session
session_name("EquipmentReservation");
session_start();
$Username = $_SESSION['user'];
$sessionAuth = $_SESSION['auth'];
$sid = $_SESSION['sid'];

//check to make sure the session variable is registered
if(session_is_registered($Username) && $sessionAuth == true){

//the session variable is registered, the user is allowed to see anything that follows
$MetaRefresh = "<meta http-equiv=\"refresh\" content=\"600;URL=\"index.php\">";
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>EDM Equipment Reservations</title>
<?php
echo $MetaRefresh;
?>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="-1">
<meta http-equiv="Cache-Control" content="no-store, no-cache, must-revalidate, post-check=0, pre-check=0">
<script type="text/javascript" src="<?php echo $cal_root; ?>/includes/prototype.js"></script>
<link href="calendar.css" rel="stylesheet" type="text/css" />
<script language="javascript" src="calendar.js"></script>
<script type="text/javascript">
function hideDiv()
{
$('alert').style.visibility = "hidden";
}
</script>
<link href="includes/equip.css" rel="stylesheet" type="text/css">
</head>
<?php 
$echo = basename($_SERVER['PHP_SELF'],php);
if ($echo == "login" || $echo == "fines" || $echo == "studentinfo") { ?>
<body OnLoad=$('StudentID').focus();>
<?php } else { ?>
<body>
<?php } 
//Print_r ($_SESSION);
?>

<div id="logout"><a class="logout" href="logout.php"><img src="images/logout_icon.png">&nbsp;<strong>Logout</strong></a></div>
<div id="main">
		<div id="gray-bar"></div>
		<div id="header">
				<a href="index.php"><img src="images/logo.jpg" align="center" width="308" height="127"></a>
				<img src="images/spacer.gif" height="10" width="1">
		</div>
		<div id="content">
<? 
} else {
	header('location:login.php');
}
?>